
#pragma once
#ifndef MBv2_H_
#define MBv2_H_
#include <stdlib.h>
#include <iostream>
#include "stream_tools.h"
constexpr unsigned BIT_ACTV = 8;
constexpr unsigned BIT_WGHT = 8;
constexpr unsigned BIT_BIAS = 24;
constexpr unsigned BIT_MULT = 24;
constexpr unsigned BIT_CONV = 24;
constexpr unsigned BIT_NORM = 18;
constexpr unsigned BIT_IO = 32;
constexpr unsigned DEFAULT_DEPTH = 16;
constexpr unsigned BRANCH_DEPTH = 8192;

constexpr unsigned HIGHT0 = 224;
constexpr unsigned WIDTH0 = 224;
constexpr unsigned HIGHT1 = HIGHT0 / 2;
constexpr unsigned WIDTH1 = WIDTH0 / 2;
constexpr unsigned HIGHT2 = HIGHT1 / 2;
constexpr unsigned WIDTH2 = WIDTH1 / 2;
constexpr unsigned HIGHT3 = HIGHT2 / 2;
constexpr unsigned WIDTH3 = WIDTH2 / 2;
constexpr unsigned HIGHT4 = HIGHT3 / 2;
constexpr unsigned WIDTH4 = WIDTH3 / 2;
constexpr unsigned HIGHT5 = HIGHT4 / 2;
constexpr unsigned WIDTH5 = WIDTH4 / 2;
constexpr unsigned N_BATCH = 1;

#define __AP_INT__
#ifdef __AP_INT__
typedef ap_int<BIT_ACTV>	ADT;
typedef ap_int<BIT_WGHT>	WDT;
typedef ap_int<BIT_CONV>	CDT;
typedef ap_int<BIT_BIAS>	BDT;
typedef ap_int<BIT_MULT>	MDT;
typedef ap_int<BIT_IO>		IDT;
typedef ap_int<BIT_IO>		ODT;
#else
typedef int8_t	ADT;
typedef int8_t	WDT;
typedef int32_t	CDT;
typedef int32_t	BDT;
typedef int32_t	MDT;
typedef int32_t	IDT;
typedef int32_t	ODT;
#endif
void mobilenet_v2(data_stream<BIT_IO>& in, axiu_stream<BIT_IO>& out);
#endif